class AccountType {
  String? employeeNum;
  String? pwd;

  AccountType({this.employeeNum, this.pwd});
}

class UserInfoType {
  List<String>? authList;
  String? employeeNum;
  bool? hasAdminRole;
  int? id;
  int? ingWorkOrderNum;
  List<int>? rtoLiveLocIds;
  List<String>? rtoLiveLocNames;
  String? tel;
  String? token;
  String? userName;

  UserInfoType(
      {this.id,
      this.employeeNum,
      this.authList,
      this.hasAdminRole,
      this.ingWorkOrderNum,
      this.rtoLiveLocIds,
      this.rtoLiveLocNames,
      this.tel,
      this.token,
      this.userName});

  factory UserInfoType.fromJson(Map<dynamic, dynamic> json) {
    List<int> rtoLiveLocIds =
        (json['rtoLiveLocIds'] as List<dynamic>).cast<int>();

    List<String> rtoLiveLocNames =
        (json['rtoLiveLocNames'] as List<dynamic>).cast<String>();

    List<String> authList = (json['authList'] as List<dynamic>).cast<String>();

    return UserInfoType(
        id: json['id'],
        employeeNum: json['employeeNum'],
        hasAdminRole: json['hasAdminRole'],
        tel: json['tel'],
        token: json['token'],
        userName: json['userName'],
        ingWorkOrderNum: json['ingWorkOrderNum'],
        rtoLiveLocIds: rtoLiveLocIds,
        rtoLiveLocNames: rtoLiveLocNames,
        authList: authList);
  }
}
